﻿<UserControl x:Class="DiscoveryLogic.Analytics.Modules.Networks.NetworkStats"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Controls="clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit"
    Height="Auto" Width="Auto" Loaded="UserControl_Loaded">
    <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Background="White">
        <StackPanel Orientation="Vertical" Margin="5">
            <Expander x:Name="exVertices" Visibility="Collapsed"
                Header="Vertice measures" IsExpanded="True">
                
                    <Controls:DataGrid x:Name="dgStats" AutoGenerateColumns="False">
                        <Controls:DataGrid.Columns>
                            <Controls:DataGridTextColumn Width="50" Header="Entity" Binding="{Binding EntityType}"/>
                            <Controls:DataGridTextColumn Width="30" Header="ID" Binding="{Binding ID}"/>
                            <Controls:DataGridTextColumn Width="120" Header="Name" Binding="{Binding Name}"/>
                            <Controls:DataGridTextColumn Width="40" Header="Degreee" Binding="{Binding Degree}"/>
                            <Controls:DataGridTextColumn Width="40" Header="In Degree" Binding="{Binding InDegree}"/>
                            <Controls:DataGridTextColumn Width="40" Header="Out Degree" Binding="{Binding OutDegree}"/>
                            <Controls:DataGridTextColumn Width="40" Header="BC" Binding="{Binding BetweenCentrality}"/>
                            <Controls:DataGridTextColumn Width="40" Header="CC" Binding="{Binding CloseCentrality}"/>
                            <Controls:DataGridTextColumn Width="40" Header="Flow" Binding="{Binding Flow}"/>
                        </Controls:DataGrid.Columns>
                    </Controls:DataGrid>
            </Expander>
            <Expander x:Name="exEdges" Visibility="Collapsed"
                Header="Edge measures" IsExpanded="True">
                <Grid Margin="10,5,10,5">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="30"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="145"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>

                    <Label 
                        Grid.Row="0" Grid.Column="0"
                        Margin="5,0,0,0"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left">
                        Distance range:    
                    </Label>
                    <TextBlock
                        Grid.Row="0" Grid.Column="1"
                        Margin="5,0,0,0"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        MinWidth="250">
                            
                    </TextBlock>
                </Grid>
            </Expander>
            <Expander x:Name="exGraph" Visibility="Collapsed"
                Header="Graph measures" IsExpanded="True">
                    <StackPanel Margin="10,5,10,5" Orientation="Vertical">
                        <Border CornerRadius="5" BorderBrush="Silver" BorderThickness="1">
                            <StackPanel Orientation="Horizontal">
                                <Label 
                                Width="125"
                                Margin="5,0,0,0" VerticalAlignment="Top">
                                    Node count:
                                </Label>
                                <StackPanel 
                                Orientation="Vertical"
                                VerticalAlignment="Top" x:Name="panelEntityCount">
                                </StackPanel>
                            </StackPanel>
                        </Border>

                        <Border CornerRadius="5" BorderBrush="Silver" BorderThickness="1">
                            <StackPanel Orientation="Horizontal">
                                <Label 
                                Width="125"
                                Margin="5,0,0,0" HorizontalAlignment="Left" 
                                VerticalAlignment="Center">
                                    Density:
                                </Label>
                                <TextBlock 
                            x:Name="txtDensity"
                            Margin="10,0,0,0"
                            HorizontalAlignment="Left"
                            VerticalAlignment="Center"></TextBlock>
                            </StackPanel>
                        </Border>

                        <Border CornerRadius="5" BorderBrush="Silver" BorderThickness="1">
                            <StackPanel Orientation="Horizontal">
                                <Label
                                Width="125" Margin="5,0,0,0" 
                                VerticalAlignment="Top">
                                    Diameters:
                                </Label>
                                <StackPanel 
                                Orientation="Vertical"
                                VerticalAlignment="Top" x:Name="panelDistances">

                                </StackPanel>
                            </StackPanel>
                        </Border>

                        <Border CornerRadius="5" BorderBrush="Silver" BorderThickness="1">
                            <StackPanel Orientation="Horizontal">
                                <Label Width="125" Margin="5,0,0,0" VerticalAlignment="Top">
                                    Walks:
                                </Label>
                                <ScrollViewer 
                                HorizontalScrollBarVisibility="Auto" 
                                VerticalScrollBarVisibility="Auto">
                                    <Controls:DataGrid 
                                    x:Name="dgRoutes" 
                                    AutoGenerateColumns="False" Width="Auto" Height="Auto">
                                        <Controls:DataGrid.Columns>
                                            <Controls:DataGridTextColumn Width="150" Header="From" Binding="{Binding FromEntity}"/>
                                            <Controls:DataGridTextColumn Width="150" Header="To" Binding="{Binding ToEntity}"/>
                                            <Controls:DataGridTextColumn Width="50" Header="Distance" Binding="{Binding Distance}"/>
                                            <Controls:DataGridTextColumn Width="50" Header="Hops" Binding="{Binding Hops}"/>
                                            <Controls:DataGridTextColumn Width="250" Header="Route" Binding="{Binding Path}"/>
                                        </Controls:DataGrid.Columns>
                                    </Controls:DataGrid>
                                </ScrollViewer>
                            </StackPanel>
                        </Border>

                        <Border CornerRadius="5" BorderBrush="Silver" BorderThickness="1">
                            <StackPanel Orientation="Horizontal">
                                <Label Width="125" Margin="5,0,0,0" VerticalAlignment="Top">
                                    Cliques:
                                </Label>

                            <StackPanel Orientation="Vertical">
                                <Controls:DataGrid 
                                    x:Name="dgCliques" 
                                    AutoGenerateColumns="False" Width="Auto" Height="Auto">
                                    <Controls:DataGrid.Columns>
                                        <Controls:DataGridTextColumn Width="50" Header="ID" Binding="{Binding ClusterID}"/>
                                        <Controls:DataGridTextColumn Width="100" Header="Density" Binding="{Binding Density}"/>
                                        <Controls:DataGridTextColumn Width="100" Header="Degree" Binding="{Binding ClusterDegree}"/>
                                        <Controls:DataGridTextColumn Width="100" Header="Entities" Binding="{Binding EntityCount}"/>
                                        <Controls:DataGridTextColumn Width="100" Header="Ratio" Binding="{Binding Coefficient}"/>
                                    </Controls:DataGrid.Columns>
                                </Controls:DataGrid>

                                <Controls:DataGrid 
                                    x:Name="dgCliqueEntities" 
                                    AutoGenerateColumns="False" Width="Auto" Height="Auto">
                                    <Controls:DataGrid.Columns>
                                        <Controls:DataGridTextColumn Width="50" Header="ID" Binding="{Binding ClusterID}"/>
                                        <Controls:DataGridTextColumn Width="250" Header="Entity" Binding="{Binding EntityName}"/>
                                    </Controls:DataGrid.Columns>
                                </Controls:DataGrid>
                            </StackPanel>
                        </StackPanel>
                        </Border>
                    </StackPanel>
            </Expander>
        </StackPanel>
    </ScrollViewer>
</UserControl>
